home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-09-04 | 5.8 KB | 241 lines | [TEXT/MPS ] |
- // Copyright © 1991 by Apple Computer, Inc. All rights reserved.
- // Windoid.r file.
-
- // INCLUDES ---------------------------------------------------------------------------------
- // Auto-Include the requirements for this source
-
- #ifndef __TYPES.R__
- #include "Types.r"
- #endif
-
- #ifndef __SYSTYPES.R__
- #include "SysTypes.r" // needed for version resource
- #endif
-
- #ifndef __MacAppTypes__
- #include "MacAppTypes.r"
- #endif
-
- #if qTemplateViews
- #ifndef __ViewTypes__
- #include "ViewTypes.r"
- #endif
- #endif
-
- #if qDebug
- include "Debug.rsrc";
- #endif
-
- #include "WindoidRez.h" // common header file for resource IDs
-
-
- // RESOURCES -------------------------------------------------------------------------------
-
- include "MacApp.rsrc";
- include "Printing.rsrc";
- include "FloatWindow.rsrc"; // floating window resources
-
-
- // CODE ------------------------------------------------------------------------------------
-
- include $$Shell("ObjApp")"Windoid" 'CODE';
-
-
- // SIZE ------------------------------------------------------------------------------------
-
- resource 'SIZE' (-1) {
- saveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- doesActivateOnFGSwitch,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreAppDiedEvents,
- is32BitCompatible,
- isHighLevelEventAware,
- localAndRemoteHLEvents,
- notStationeryAware,
- reserved,
- reserved,
- reserved,
- reserved,
- #if qdebug
- 450 * 1024,
- 368 * 1024
- #else
- 300 * 1024,
- 200 * 1024
- #endif
- };
-
-
- // SEG! ------------------------------------------------------------------------------------
-
- resource 'seg!' (256, purgeable) {
- {
- "GNonRes";
- "GSelCommand";
- "GTerminate";
- "GClose";
- "GDoCommand";
- }
- };
-
-
- // VERS ------------------------------------------------------------------------------------
- // Get the default Version resources
-
- include "Defaults.rsrc" 'vers' (1); // application or file specific
- include "Defaults.rsrc" 'vers' (2); // overall package
-
-
- // ALERTS AND DLOGS ------------------------------------------------------------------------
-
- include "Defaults.rsrc" 'ALRT' (phAboutApp); // About… window
- include "Defaults.rsrc" 'DITL' (phAboutApp); // About… contents
- include "Defaults.rsrc" 'STR#' (kDefaultCredits); // credits
-
-
- // ICONs and BUNDLEs -----------------------------------------------------------------------
- // Get the default MacApp® application icon and file reference
-
- include "Defaults.rsrc" 'ICN#' (128);
- include "Defaults.rsrc" 'FREF' (128);
-
-
- // CMNUs -----------------------------------------------------------------------------------
-
- include "Defaults.rsrc" 'CMNU' (mApple); // grab the default Apple/File menus
-
- resource 'CMNU' (mFile,
- #if qNames
- "mFile",
- #endif
- nonpurgeable) {
- mFile,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "File",
- {
- "New", noIcon, "N", noMark, plain, cNew;
- "Close", noIcon, "W", noMark, plain, cClose;
- "-", noIcon, noKey, noMark, plain, nocommand;
- "Quit", noIcon, "Q", noMark, plain, cQuit
- }
- };
-
-
- resource 'CMNU' (mWindoid,
- #if qNames
- "mWindoid",
- #endif
- nonpurgeable) {
- mWindoid,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "Windoid",
- {
- "Green", noIcon, noKey, noMark, plain, cGreen;
- "Yellow", noIcon, noKey, noMark, plain, cYellow;
- "Red", noIcon, noKey, noMark, plain, cRed;
- }
- };
-
- resource 'CMNU' (mNormalMenu,
- #if qNames
- "mNormalMenu",
- #endif
- nonpurgeable) {
- mNormalMenu,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "Set Light",
- {
- /* [1] */ "Green", noIcon, "G", noMark, plain, cNormGreen;
- /* [2] */ "Yellow", noIcon, "Y", noMark, plain, cNormYellow;
- /* [3] */ "Red", noIcon, "R", noMark, plain, cNormRed
- }
- };
-
-
- // MBARs -----------------------------------------------------------------------------------
- // Displayed menus
-
- resource 'MBAR' (kMBarDisplayed,
- #if qNames
- "Windoid",
- #endif
- purgeable) {
- {mApple; mFile; mWindoid; mNormalMenu}
- };
-
-
- // VIEW RESOURCES NEEDED -------------------------------------------------------------------
-
- #if qTemplateViews
-
- // default big window ----------------------------------------------------------------------
-
- resource 'view' (kDefaultWindowID,
- #if qNames
- "kDefaultWindowID",
- #endif
- purgeable) {
- {
- root, 'WIND', { 50, 20 }, { 200, 350 },
- sizeVariable, sizeVariable, shown, enabled,
- Window { "", zoomDocProc, goAwayBox,
- Resizable, modeless,ignoreFirstClick,
- freeOnClosing, disposeOnFree, closesDocument,
- openWithDocument, dontAdaptToScreen, stagger,
- forceOnScreen, dontCenter, 'DFLT', "" };
-
- 'WIND', 'SCLR', { 0, 0 }, { 200-kSBarSizeMinus1, 350-kSBarSizeMinus1 },
- sizeRelSuperView, sizeRelSuperView, shown, enabled,
- Scroller { "", vertScrollBar, horzScrollBar, 0, 0, 16, 16,
- vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
-
- 'SCLR',IncludeViews { kDefaultViewID }
- }
- };
-
-
- // default view inside default window ------------------------------------------------------
-
- resource 'view' (kDefaultViewID,
- #if qNames
- "kDefaultViewID",
- #endif
- purgeable) {
- {
- root, 'DFLT', { 0, 0 }, { 150, 320}, sizeFixed, sizeFixed, shown, enabled,
- DefaultView {""} // A ClassName can be put in this string
- // or do a RegisterStdType to point to
- // something to create for a "Default View"
- }
- };
-
-
- // light palette view ----------------------------------------------------------------------
-
-
- resource 'view' (kLightPaletteRSRCID, purgeable) { {
- root, 'TWND', { 80, 80 }, { kLightPaletteHeight, kLightPaletteWidth }, sizeFixed, sizeFixed, shown, enabled,
- Window {
- "TFloatWindow",
- kWindoidWDEF + kWindoidNotResizable, goAwayBox, notResizable,
- modeless, ignoreFirstClick, dontfreeOnClosing,
- dontdisposeOnFree, doesntCloseDocument, dontOpenWithDocument,
- dontAdaptToScreen, dontStagger,
- forceOnScreen, dontCenter, noid, "" };
-
- 'TWND', 'TPLT', { 0, 0 }, { kLightPaletteHeight, kLightPaletteWidth }, sizeFixed, sizeFixed, shown, enabled,
- view { "TLightPalette" };
- } };
-
-
- #endif